<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    


    <script type="text/javascript">
        let person = {name:'Tom',sex:'男'}              //这个地方是浅拷贝
        let person2 = person
        person.name ='Jerry'
        console.log(person2.name)                       //打印出 Jerry


        let student = {name:'Ala',sex:'男'}
        let student2 = {...student}
        student.name='Tom'
        console.log(student.name)                       //打印出 Ala


    </script>

</body>
</html>